<template>
	<view v-html="content" class="box">

	</view>
</template>

<script>
	export default {
		data() {
			return {
				content: ""
			}
		},
		async onLoad(options) {

			if (options.id == 1) {
				uni.setNavigationBarTitle({
					title: '用户协议'
				})
				const [err, rs] = await this.$get(this.$api.getItemByCodeAndType, {
					code: 'PROTOCOL_LOGIN_PUBLISH',
					type: 4
				})
				console.log(err)
				if (rs) {
					console.log(rs)
					this.content = rs.data.value
					console.log(this.content)
				}
				// }
			} else {
				uni.setNavigationBarTitle({
					title: '隐私政策'
				})
				const [err, rs] = await this.$get(this.$api.getItemByCodeAndType, {
					code: 'PROTOCOL_LOGIN_PRIVACY_PUBLISH',
					type: 4
				})
				console.log(err)
				if (rs) {
					this.content = rs.data.value
					console.log(this.content)
				}
			}

		},
		methods: {

		}
	}
</script>

<style scoped>
	.box {
		padding: 20rpx;
	}
</style>
